<template>
  <section>
    <div>
      <el-checkbox v-model="value.value">限定输入格式(正则)</el-checkbox>
    </div>
    <el-form-item v-if="value.value" label="比如要求输入字符串:^[a-z]+$">
      <el-input v-model="value.pattern" placeholder="" size="small" />
      邮箱检测示例:<br/>^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6}$
    </el-form-item>
    <el-form-item v-if="value.value" label="不满足正则匹配的错误文字">
      <el-input v-model="value.errormsg" placeholder="" size="small" />
    </el-form-item>
  </section>
</template>

<script>
  export default {
    props: {
      value: {
        type: Object,
        default: null
      },
    },
    data() {
      return {
        sp: {},
        sr: {},
        param: {}
      }
    },
    created(options) {
      let that = this;
      that.xinit();
    },
    methods: {
      xinit() {
        let that = this;
      },
    }
  }
</script>

<style>

</style>
